<template>
	<div>
		<table>
			<tr><th>序号</th><th>姓名</th><th>性别</th><th>年龄</th></tr>
			<tr v-for="(person,index) in persons" :key="person.key">
				<td>{{index}}</td><td>{{person.name}}</td><td>{{person.sex}}</td><td>{{person.age}}</td>
			</tr>
		</table>
	</div>
</template>

<script>
export default{
	data(){
		return{
			persons:[{name:'张三',sex:'男',age:18,key:1},{name:'李四',sex:'女',age:16,key:2},{name:'王五',sex:'男',age:19,key:3}],
		}
	}	
}
</script>

<style>
</style>